import * as React from 'react'
import { View, TouchableOpacity, Text } from 'react-native'

import { RefreshList, RefreshState } from './index'



const App = () => {

    const [refreshState, setRefreshState] = React.useState(RefreshState.Idle)

    const listRef = React.useRef<any>()
    const dataList = Array(20)
        .fill("")
        .map((_, i) => ({ key: `${i}`, text: `item #${i}` }))
    // return (



        // <RefreshList
        //     mode='SwipeList'
        //     ref={listRef}
        //     data={dataList}
        //     renderItem={(data, rowMap) => (
        //         <View >
        //             <Text>I am {data.item.text} in a SwipeListView</Text>
        //         </View>
        //     )}
        //     refreshState={refreshState}
        //     onHeaderRefresh={() => {

        //     }}
        //     onFooterRefresh={() => {

        //     }}
        //     renderHiddenItem={(data, rowMap) => (
        //         <TouchableOpacity onPress={() => {
        //             listRef.current?.safeCloseOpenRow()
        //         }}>

        //         </TouchableOpacity>
        //     )}
        // />

    // )
}